package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author 李旭
 * @date 2021/11/27 15:00
 * @Description:
 */
@FeignClient(name = "service-cart")
public interface CartInfoFeignClient {

    //
    //加入购物车
    @GetMapping("/api/cart/addCart/{skuId}/{skuNum}")
    public void addCart(@PathVariable Long skuId, @PathVariable Integer skuNum);
    @GetMapping("/api/cart/toCart/{skuId}")
    public CartInfo toCart(@PathVariable Long skuId);

    //查询商品清单   查询当前用户的购物车中已经选中了的商品
    @GetMapping("/api/cart/findCartListAndChecked")
    public List<CartInfo> findCartListAndChecked();
}
